#ifndef __LIST_H__
#define __LIST_H__



class list
{
private:
    struct Node
    {
        int data;

        Node* next;
        Node* pre;
    };

    Node* head;
    Node* tail;

    int length;
public:
    list();
    ~list();

    void push_back(int data);
    void push_front(int data);
    void insert(int index, int data);
    void pop_back();
    void pop_front();

    void remove(int index);
    void clear();

    bool empty();
    int size() const;

    void visit();
};




#endif